<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>商品详情</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body> 
<div class="prodetail">
    <div class="comment">
    	<h2>商品评价<a href="evaluatelist.html"><?=$count?></a></h2>
        <ul>
			<volist name="list" id="vo">
				<li>
					<div class="top" onClick="window.location='__MODULE__/ForetasteEvaluate/commentdetail/e_id/{$vo.id}'">
						<div class="pic"><img src="<?=$vo['avatar']?>"/></div>
						<h3><?=$vo['nickname']?></h3><b><?=$vo['hometown']?></b><time>{$vo.addtime|date="Y-m-d",###}</time>
					</div>
					<div class="wz">
						<p><?=$vo['content']?></p>
						<p>
							<volist name="vo.pic" id="v">
								<img src="<?=$v?>" />
							</volist>
						</p>
					</div>
					<div class="number">
						<span class="zan" data-id="{$vo.id}" data-table="foretaste_evaluate"><?=$vo['like_num']?></span>
						<span style="background:url(__PUBLIC__/Wx/img/comm.png) no-repeat left center; background-size:20px 20px;" onClick="window.location='__MODULE__/ForetasteEvaluate/commentdetail/e_id/{$vo.id}'"><?=$vo['comm_num']?></span>
					</div>
				</li>
			</volist>
        </ul>
    </div>
</div>
	<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.3.1.min.js"></script>
	<script type="text/javascript">
		// 点赞&取消赞
    	$(".zan").click(function(){
            var e_id = $(this).attr('data-id');
            var table = $(this).attr('data-table');
            var zan = $(this);
            var zan_num = zan.html();
        	if($(this).hasClass("zan02")){
                $.post('/Wx/ForetasteEvaluate/cancleLike',{e_id:e_id,table:table},function (data) {
                    zan.removeClass("zan02");
                    zan.html(zan_num-1)
                })
        	}else{
                $.post('/Wx/ForetasteEvaluate/addLike',{e_id:e_id,table:table},function (data) {
                    zan.addClass("zan02");
                    zan.html(zan_num*1+1)
                })

			}
		});
	</script>
</body>
</html>